How stars are formed step by step